Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View entity to fetch eligible records #2

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Shinde-nutan
Copy link

@Shinde-nutan Shinde-nutan commented Dec 3, 2024

Added two views in the component

  1. EligibleOrdersForNetSuiteView
  • To get the eligible orders for the create order feed.
  1. OrdersDetailsForNetSuiteView
  • This view was created to get the required order level details.
  1. OrderItemsForNetSuiteView
    • The primary purpose of the OrderItemsForNetSuiteView view is to fetch order item-level details that are required for creating the order feed from Hotwax to NetSuite.
    • It specifically checks for the eligibility of each order item for NetSuite processing by ensuring that the product has a corresponding NetSuite product ID.`.

@Shinde-nutan Shinde-nutan requested a review from dt2patel December 3, 2024 15:06
@Shinde-nutan Shinde-nutan self-assigned this Dec 3, 2024
entity/OrderViewEntities.xml Outdated Show resolved Hide resolved
@Shinde-nutan Shinde-nutan marked this pull request as draft December 11, 2024 14:59
@Shinde-nutan Shinde-nutan marked this pull request as ready for review December 14, 2024 16:04
<key-map field-name="partyId"/>
<entity-condition>
<econdition entity-alias="PID" field-name="partyIdentificationTypeId" value="NETSUITE_CUSTOMER_ID"/>
</entity-condition>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Shinde-nutan,
Add one more entity condition to include "SHOPIFY_CUST_ID"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello sir,
In this view we are fetching the details which is required for an order to sync at Netsuite.
the shopify customer id is not required field. if needed we can add that in the custom groovy file which we are preparing specific to client.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we will have Shopify as a constant in our integrations, fetching the field in this view will make this specific to Shopify only and create need for refactoring should orders enter HotWax from another source. For now I agree with @Shinde-nutan here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @dt2patel

I agreed.

During the KR Production rollout, someone enabled the "Import Customer Job," which resulted in duplicate customers being created in NetSuite. When we create customers through the "Import Customer Job," we store the Shopify Customer ID in the External ID field of the Party entity.

However, when syncing historical customers from NetSuite or importing a new order from Shopify, we create a PartyIdentification record with the Shopify Customer ID and the corresponding partyIdentificationTypeID defined in OMS.

To avoid duplication issues, we need to add a condition to filter valid customer records appropriately during the fetch process. So we can add the condition in the Groovy file.

CC: @Shinde-nutan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants